
  console.log ('Treexy 1.1');

  var args = process.argv.slice (2);
  
  if (args.length != 2) {
    console.log ('Usage: node index.js <INPUT_FILE_NAME> <OUTPUT_FILE_NAME>');
    process.exit ();
  }

  var Treexy = require ('./treexy');
  var fs = require ('fs');
  var util = require ('util');
  
  var inputFileName = args[0];
  var outputFileName = args[1];
  
  var treexy = new Treexy;
  
  var fileWatcher = function () {
    var inputData = fs.readFileSync (inputFileName).toString ();
    var compiledData = treexy.compile (inputData);
    fs.writeFileSync (outputFileName, compiledData);
  }
  
  fs.watchFile (inputFileName, fileWatcher);
  fileWatcher ();
